package com.hmsm.dingtalk.openapi;

import com.dingtalk.open.client.api.model.corp.JsapiTicket;



public class EnterpriseConfig {
	
	public static final String OAPI_HOST = "https://oapi.dingtalk.com";
	
	public final String CORP_ID;
	
	public final String CORP_SECRET;
	public final String SSO_Secret;
	
	public String agentId;
	
	public String getAgentId() {
		return agentId;
	}

	public void setAgentId(String agentId) {
		this.agentId = agentId;
	}

	public Token accessToken = null;
	public JsapiTicket jsapiTicket = null;

	public static final String OA_BACKGROUND_URL = "";
	
	public static String suiteTicket; 
	public static String authCode; 
	public static String suiteToken; 

	public static final String CREATE_SUITE_KEY = "suite4xxxxxxxxxxxxxxx";
	public static final String SUITE_KEY = "";
	public static final String SUITE_SECRET = "";
	public static final String TOKEN = "";
	public static final String ENCODING_AES_KEY = "";
	
	public EnterpriseConfig(String CORP_ID, String CORP_SECRET, String SSO_Secret){
		this.CORP_ID = CORP_ID;
		this.CORP_SECRET = CORP_SECRET;
		this.SSO_Secret =SSO_Secret;
	}
	
	public String getCorpId(){
		return CORP_ID;
	}

	public String getAccessTokenValue() {
		String accessTokenValue = null;
		
		if (accessToken!=null){
			accessTokenValue = accessToken.toString();
		}
		
		return accessTokenValue;
	}

	public void setAccessToken(String accToken, long expireTime) {
		this.accessToken = new Token(accToken, expireTime);
	}

	public void setJsapiTicket(JsapiTicket jsapiTicket) {
		this.jsapiTicket = jsapiTicket;
	}
}
